package com.example.demo.strategy.stringStrategy;

/**
 * @author dxw
 * @ClassName: AddGetPrefixConverter
 * @Description: 添加 get 前缀（首字母大写）
 * @Date: 2025/11/02
 */
public class AddGetPrefixConverter implements StringConverterStrategy {
    @Override
    public String execute(String msg) {
        if (msg == null || msg.isEmpty()) {
            return msg;
        }
        
        // 首字母大写
        String firstLetter = msg.substring(0, 1).toUpperCase();
        String remainingLetters = msg.substring(1);
        
        // 添加 get 前缀
        return "get" + firstLetter + remainingLetters;
    }
}

